<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户注册</title>
<link href="themes/chunshuitang/css/regincss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/iepng.js"></script>
<script type="text/javascript" src="themes/chunshuitang/js/jquery-1.7.2.js"></script>
<script type="text/javascript">
function cls(){
	with(event.srcElement) 
	if(value==defaultValue) {
	
	   value="";
	   if(type == 'text' && (name=='password' || name == 'password2')){
	   		type = 'password';
	   }
	} 
} 
function res(){ 
	with(event.srcElement) 
	if(value=="") {
		value=defaultValue;
		type = 'text'; 
	}
}
$(document).ready(function(){
	var len = parseInt($("#reg_bg").css("marginLeft"));
	var diff = 0;
	window.setInterval(function(){
		len = parseInt($("#reg_bg").css("marginLeft"));
		if(Math.abs(len) < 1440*2){
			diff = diff + (-1440);
		} else {
			diff = 0;
		}
		$("#reg_bg").animate({"margin-left":diff},500);
		
	},3000);
});
</script>
<!--[if lte ie 6]>
<script src="scripts/iepng.js" type="text/javascript"></script>
<script type="text/javascript">
   EvPNG.fix('div,ul,img,li,input,a,img,p,span');
</script>
<![endif]-->
</head>

<body style="OVERFLOW-X: hidden;width: 100%">
<div id="container">
     <div class="top">
  </div>
     <div class="middle">
     <div style='width:1440px;overflow:hidden'>
     	<div style='width:4320px' id='reg_bg'>
        <div style='float:left'><img src="images/zhuce1440750_08.jpg" border="0" /></div>
        <div style='float:left'><img src="images/zhuce1440750_082.jpg" border="0" /></div>
        <div style='float:left'><img src="images/zhuce1440750_083.jpg" border="0" /></div>
        </div>
    </div>
    
        <div class="aylogo"><img src="images/zhuce1440750_06.jpg" border="0" /></div>
        <div class="zckuang">
          <div class="zcktop"></div>
          <div class="zckmiddle">
          <form action="user.php" method="post" name="formUser" id="formUser">
          <input name="act" type="hidden" value="act_register" />
          <input type="hidden" name="back_act" value="{$back_act}" />
          <input type="hidden" name="agreement" value="1" />
              <div class="zckmidcon">
                 <h2 style="text-align:center;">注册到爱优</h2>
                 <div class="kuang1">
                 <input type="text" name="email_mobile" id="email_mobile" class="kuangcon1" value="手机/邮箱" onfocus="cls();" onblur="res()";/> 
                 <div id="email_mobile_gou" style='position:absolute;left:380px;top:90px;display:none'><img src="images/gou.jpg" /></div>
              </div>
              <div class="kuang1">
                 <input type="text" name="password" id="r_password" class="kuangcon1 kuangcon2" value="设置密码" onfocus="cls();" onblur="res()";/>                   
                  <div id="r_password_gou" style='position:absolute;left:380px;top:130px;display:none'><img src="images/gou.jpg" /></div>
              </div>
              <div class="kuang1">
                 <input type="text" name="password2" id="r_password2" class="kuangcon1 kuangcon2" value="确认密码" onfocus="cls();" onblur="res()";/>
                  <div id="r_password2_gou" style='position:absolute;left:380px;top:170px;display:none'><img src="images/gou.jpg" /></div>
              </div>
              
              <div class="kuang1 kuang2">
                 <input type="text" name='username' id="r_username" class="kuangcon1 kuangcon3" value="大侠！在爱优起个江湖称号吧~" onfocus="cls();" onblur="res()";/>
                   <div id="r_username_gou" style='position:absolute;left:380px;top:210px;display:none'><img src="images/gou.jpg" /></div>
              </div>
              <div class="kuang1 kuang3">
                <p><a href="javascript:void(0)" id="reg_submit">同意协议并注册</a></p>
                 
              </div>
              <div class="kuang1">
                <p class="kuang_jz"><!-- <input type="checkbox" checked="checked" /> 记住我 --><a style="color:#71716f; margin-left:20px;" href="#">爱优服务协议 </a></p>
                 
              </div>
                
              </div>
              </form>
          </div>
                 <script>
       //注册验证
       $(document).ready(function(){
    	   //各个输入框失去焦点验证
    	   $("#email_mobile").blur(function(){
    		   email_mobile = $(this).val();
    		   if(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(email_mobile) == false && /^(13[0-9]{9})|(15[0389][0-9]{8})|189[0-9]{8}$/.test(email_mobile) == true){
    			   $("#email_mobile_gou").show();
			   } else {
				   $("#email_mobile_gou").hide();
			   }
    	   });
    	   $("#r_password").blur(function(){
    		   password = $(this).val();
    		   if(password.length>=6){
    			   $("#r_password_gou").show();
			   } else {
				   $("#r_password_gou").hide();
			   }
    	   });
    	   $("#r_password2").blur(function(){
    		   password2 = $(this).val();
    		   password = $("#r_password").val();
    		   if(password2 == password){
    			   $("#r_password2_gou").show();
			   } else {
				   $("#r_password2_gou").hide();
			   }
    	   });
    	   $("#r_username").blur(function(){
    		   username = $(this).val();
    		   if(username != ''){
    			   $("#r_username_gou").show();
			   } else {
				   $("#r_username_gou").hide();
			   }
    	   });
    	   //表单提交验证
			$("#reg_submit").click(function(){
			    email_mobile = $("#email_mobile").val();
				username  = $("#r_username").val();
				password  = $("#r_password").val();
				password2 = $('#r_password2').val();
				if(email_mobile == '' || email_mobile == '手机/邮箱'){
					alert('请先填写邮箱或者手机号');
					return false;
				}
				if(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(email_mobile) == false && /^(13[0-9]{9})|(15[0389][0-9]{8})|189[0-9]{8}$/.test(email_mobile) == false){
					alert("请填写正确的email地址或者手机号");
					$("#email_mobile").focus();
					return false;
				}
				
				if(password == '' || password == '设置密码'){
					alert('请先填写密码');
					$("#r_password").focus();
					return false;
				}
				if(password != password2){
					alert('两次密码填写不相同');
					return false;
				}
				if(username == '' || username == '大侠！在爱优起个江湖称号吧~'){
					alert('请先填写用户名,即江湖称号');
					$("#r_username").focus();
					return false;
				}
				$("#formUser").submit();
			});
		});
       </script>
          <div class="zckbottom">
          </div>
        </div>
     </div>
     
  <div class="bottom">
 <div class="bottomleft">
         <p>温馨提示：注册爱优会员后，您可以免费获赠200积分，还可以免费获赠60元优惠卷，更多折扣、更多优惠尽在爱优会员。</p>
       </div>
 <div class="bottomleft bottomright">
         <p>温馨提示：注册爱优会员后，您可以免费获赠200积分，还可以免费获赠60元优惠卷，更多折扣、更多优惠尽在爱优会员。</p>
       </div>
       
     </div>
     
  </div>
</body>
</html>
